[PATCH] Do stricter error checking when parsing path nodes
authorEirik Aavitsland <eirik.aavitsland@qt.io>
Mon, 25 Oct 2021 12:17:55 +0000 (14:17 +0200)
committerUtkarsh Gupta <utkarsh@debian.org>
Mon, 24 Jan 2022 10:55:59 +0000 (10:55 +0000)
commit74aba9ad129cb8aa63da9887adb16404f5421969
tree5c3e0c861f417dae2819e72eb1cec840647ec3bb
parente4d401765e154ab85a06215654dd2101d5f00e3b
[PATCH] Do stricter error checking when parsing path nodes

The SVG spec mandates that path parsing should terminate on the first
error encountered, and an error be reported. To improve the handling
of corrupt files, implement such error handling, and also limit the
number of QPainterPath elements to a reasonable range.

Fixes: QTBUG-96044
Change-Id: Ic5e65d6b658516d6f1317c72de365c8c7ad81891
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
(cherry picked from commit 36cfd9efb9b22b891adee9c48d30202289cfa620)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Gbp-Pq: Name CVE-2021-45930.patch
src/svg/qsvghandler.cpp